Repository navigation
Conversation
`bench.sh run tpch` used the Criterion SQL harness, which writes no timing JSON, so `bench.sh compare` had nothing to read for tpch. The benchmark_runner plain mode runs the same SQL suite with the shared sampler and writes dfbench-format JSON. Add a `run_benchmark_runner` helper that forwards QUERY, SIMULATE_LATENCY, ITERATIONS, MAX_TIME, LOCKSTEP_IN and LOCKSTEP_OUT to benchmark_runner, each only when set. Port run_tpch and run_tpch_mem to it. The parquet run writes tpch_sf<N>.json as dfbench did, csv writes tpch_csv_sf<N>.json and mem writes tpch_mem_sf<N>.json. Document the variables in the benchmarks README. Part of apache#24311 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ports of other benchmarks need the same results location, iteration
default and subgroup forwarding. Putting them in the helper keeps the
call sites short and consistent.
The helper takes the results name first and writes to
${RESULTS_DIR}/<name>.json, defaults to 5 iterations unless MAX_TIME is
set, and forwards BENCH_SUBGROUP.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Rationale for this change
bench.sh run tpchuses the Criterion SQL harness (cargo bench --bench sql). That harness writes no timing JSON, sobench.sh comparehas nothing to read for tpch.benchmark_runnerin its plain mode runs the same SQL suite with the shared sampler: one discarded warm-up iteration,--iterations,--max-timeand lockstep. It writes dfbench-format JSON thatcompare.pyreads.What changes are included in this PR?
run_benchmark_runnerhelper inbench.sh. It forwards the query argument,SIMULATE_LATENCY,ITERATIONS,MAX_TIME,LOCKSTEP_INandLOCKSTEP_OUTtobenchmark_runner, each only when it is set. These are named variables, not a generic pass-through. Later per-benchmark PRs reuse the helper.run_tpchandrun_tpch_mem(tpch, tpch10, tpch_csv, tpch_csv10, tpch_mem, tpch_mem10) use the helper. tpch keeps the dfbench default of 5 iterations.tpch_sf<N>.json(same name as the dfbench era)tpch_csv_sf<N>.json(before, csv and parquet overwrote each other)tpch_mem_sf<N>.jsoncargo bench --bench sqlstays usable directly for Criterion runs.Note for reviewers: query names in the results are the runner's names, for example
Qtpch/Q01/sf1. Acompareagainst results that an older dfbench checkout wrote does not pair the queries.Are these changes tested?
Manually:
ITERATIONS=2 ./bench.sh run tpch 1runs on SF 0.01 data under differentRESULTS_NAMEvalues, thencompare.pyon the two files, produced the comparison table.MAX_TIME=1 ./bench.sh run tpch_mem 3ran adaptively.CARGO_COMMAND=echo, the printed command has--iterations 5by default, theITERATIONSvalue when set, and the lockstep and latency flags when set.Are there any user-facing changes?
bench.sh run tpch*writes timing results thatbench.sh comparereads. No library changes.🤖 Generated with Claude Code